﻿using System;
using Manager;
using UnityEngine.EventSystems;

namespace UnityEngine.UI
{
	// Token: 0x0200036D RID: 877
	public class ButtonPlaySE : MonoBehaviour, IPointerDownHandler, IEventSystemHandler, IPointerUpHandler, IPointerClickHandler
	{
		// Token: 0x06001545 RID: 5445 RVA: 0x000A5A94 File Offset: 0x000A3C94
		public virtual void PlaySE()
		{
			int se = (int)this._SE;
			if (se >= Enum.GetValues(typeof(ButtonPlaySE.SE)).Length)
			{
				return;
			}
			//global::Singleton<Manager.Sound>.Instance.Play(Manager.Sound.Type.SystemSE, "sound/data/systemse.unity3d", this.seName[se], 0f, true, -1, true, "abdata");
		}

		// Token: 0x06001546 RID: 5446 RVA: 0x000A5AEC File Offset: 0x000A3CEC
		public void OnPointerClick(PointerEventData eventData)
		{
			if (this._Type != ButtonPlaySE.Type.Click)
			{
				return;
			}
			if (!Input.GetMouseButtonUp(0))
			{
				return;
			}
			this.PlaySE();
		}

		// Token: 0x06001547 RID: 5447 RVA: 0x000A5B0C File Offset: 0x000A3D0C
		public void OnPointerDown(PointerEventData eventData)
		{
			if (this._Type != ButtonPlaySE.Type.Down)
			{
				return;
			}
			if (!Input.GetMouseButtonDown(0))
			{
				return;
			}
			this.PlaySE();
		}

		// Token: 0x06001548 RID: 5448 RVA: 0x000A5B30 File Offset: 0x000A3D30
		public void OnPointerUp(PointerEventData eventData)
		{
			if (this._Type != ButtonPlaySE.Type.Up)
			{
				return;
			}
			if (!Input.GetMouseButtonUp(0))
			{
				return;
			}
			this.PlaySE();
		}

		// Token: 0x04001B4E RID: 6990
		public string[] seName = new string[]
		{
			"sse_00_02",
			"sse_00_03",
			"sse_00_04",
			"sse_00_01",
			"sse_00_06",
			"sse_00_07",
			"sse_00_08",
			"sse_00_05"
		};

		// Token: 0x04001B4F RID: 6991
		public ButtonPlaySE.Type _Type;

		// Token: 0x04001B50 RID: 6992
		public ButtonPlaySE.SE _SE;

		// Token: 0x0200036E RID: 878
		public enum Type
		{
			// Token: 0x04001B52 RID: 6994
			Click,
			// Token: 0x04001B53 RID: 6995
			Down,
			// Token: 0x04001B54 RID: 6996
			Up
		}

		// Token: 0x0200036F RID: 879
		public enum SE
		{
			// Token: 0x04001B56 RID: 6998
			ok_s,
			// Token: 0x04001B57 RID: 6999
			ok_l,
			// Token: 0x04001B58 RID: 7000
			cancel,
			// Token: 0x04001B59 RID: 7001
			sel,
			// Token: 0x04001B5A RID: 7002
			ok_s2,
			// Token: 0x04001B5B RID: 7003
			window_o,
			// Token: 0x04001B5C RID: 7004
			save,
			// Token: 0x04001B5D RID: 7005
			photo
		}
	}
}
